
package com.oahcfly.chgame.egret.ui.property;

import com.badlogic.gdx.utils.ObjectMap;

/** 图片
 * @author haocao */
public class UIAssetProperty extends BaseUIProperty {

	// x, y, w, h
	public int[] ninePatch;

	public UIAssetProperty (ObjectMap<String, String> attributes) {
		super(attributes);
		source = attributes.get("source");
		if (attributes.containsKey("scale9Grid")) {
			// scale9Grid=“13,7,28,43",x,y,w,h
			ninePatch = new int[4];

			String[] info = attributes.get("scale9Grid").split(",");
			// x
			ninePatch[0] = Integer.valueOf(info[0]);
			// y
			ninePatch[1] = Integer.valueOf(info[1]);
			// w
			ninePatch[2] = Integer.valueOf(info[2]);
			// h
			ninePatch[3] = Integer.valueOf(info[3]);
		}
	}

	public String source;

}
